library(bigMap)
source('~/FitSNE/fast_tsne.R', chdir = T)
#
d <- as.matrix(read.csv('../sierpinski3d.mtx', sep = '', header = F))
# d <- d /max(d)
e <- as.matrix(read.csv('../sierpinski3d.edg', sep = '', header = F))
#
m <- list(dSet = 's3d', is.distance = T, is.sparse = F, edge = e)
#
ppx.list <- round(nrow(d) *c(.01, .05, .1, .2, .3, .4, .5, .6, .7, .8, .9, .95, .99), 0)
#
g.list <- lapply(ppx.list, function(ppx) {
m.ppx <- m
m.ppx$Xbeta <- list(ppx = ppx, xppx = 3, nnSize = min(3 *ppx, nrow(d) -1))
m.ppx$ptsne <- list()
m.ppx$t <- list()
m.ppx$t$fitSNE <- system.time(m.ppx$ptsne$Y <- fftRtsne(d, perplexity = ppx))
m.ppx$Xbeta$B <- as.numeric(read.csv('./myBetas.txt')[, 1])
m.ppx <- bdm.qlty(m.ppx, d, qm = 'kn', k.max = NULL, sampling = 0.9, ret.qlty = T)
m.ppx$hlC <- bdm.hlCorr(m.ppx, d, 1000, T, F, threads = 4)
m.ppx
})
save(g.list, file = './glist.RData')
load('./glist.RData')
sapply(g.list, function(g) g$Xbeta$ppx)
## [1] 20 102 205 410 615 820 1025 1230 1435 1640 1845 1948 2030
hl-Correlation
hlTable <- t(sapply(g.list, function(g) summary(g$hlC)))
rownames(hlTable) <- sapply(g.list, function(g) g$Xbeta$ppx)
knitr::kable(hlTable, caption = 'hl-Correlation') %>%
kable_styling(full_width = F)
hl-Correlation
|
|
Min.
|
1st Qu.
|
Median
|
Mean
|
3rd Qu.
|
Max.
|
|
20
|
0.7179428
|
0.7182805
|
0.7208655
|
0.7214181
|
0.7240032
|
0.7259986
|
|
102
|
0.7106945
|
0.7140616
|
0.7156406
|
0.7157177
|
0.7172967
|
0.7208951
|
|
205
|
0.7017698
|
0.7095794
|
0.7122052
|
0.7096881
|
0.7123139
|
0.7125721
|
|
410
|
0.7096761
|
0.7112273
|
0.7121224
|
0.7120450
|
0.7129400
|
0.7142590
|
|
615
|
0.7140657
|
0.7207116
|
0.7237417
|
0.7221726
|
0.7252026
|
0.7271412
|
|
820
|
0.7105227
|
0.7146443
|
0.7177535
|
0.7172260
|
0.7203352
|
0.7228743
|
|
1025
|
0.6935006
|
0.6938621
|
0.6951340
|
0.6975119
|
0.6987837
|
0.7062790
|
|
1230
|
0.6983627
|
0.7012835
|
0.7027970
|
0.7041715
|
0.7056850
|
0.7127295
|
|
1435
|
0.7191932
|
0.7231124
|
0.7253989
|
0.7253479
|
0.7276344
|
0.7314005
|
|
1640
|
0.7162144
|
0.7262832
|
0.7322210
|
0.7308447
|
0.7367826
|
0.7427224
|
|
1845
|
0.7227303
|
0.7270142
|
0.7301627
|
0.7291827
|
0.7323312
|
0.7336753
|
|
1948
|
0.7141561
|
0.7152969
|
0.7224312
|
0.7231476
|
0.7302819
|
0.7335717
|
|
2030
|
0.7217078
|
0.7224747
|
0.7292954
|
0.7292898
|
0.7361105
|
0.7368606
|
Kary-neighborhood preservation
bdm.qlty.plot(g.list, qm = 'kn', ppxfrmt = 2)

Running Times
rTimes <- round(sapply(g.list, function(m) m$t$fitSNE[[3]]), 0)
rTimes <- matrix(rTimes, nrow = 1)
colnames(rTimes) <- sapply(g.list, function(m) m$Xbeta$ppx)
rownames(rTimes) <- c('FitSNE')
knitr::kable(rTimes, caption = 'Computation times (s)') %>%
kable_styling(full_width = F)
Computation times (s)
|
|
20
|
102
|
205
|
410
|
615
|
820
|
1025
|
1230
|
1435
|
1640
|
1845
|
1948
|
2030
|
|
FitSNE
|
25
|
17
|
20
|
26
|
33
|
36
|
36
|
36
|
36
|
35
|
36
|
36
|
35
|
Run on: Intel(R) Xeon(R) CPU E31225 @ 3.10GHz, 4 cores, 16GB RAM.